package com.kitty.game.rank.model.pojo;

import com.kitty.game.rank.model.record.RankRecord;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
public class DataUnit {
    private String key;
    List<RankRecord> records;

    public DataUnit(){}

    public DataUnit(String key, List<RankRecord> records) {
        this.key = key;

        ArrayList<RankRecord> newRecords = new ArrayList<>(records.size());
        for (RankRecord rankRecord : records) {
            newRecords.add(rankRecord);
        }
        this.records = newRecords;
    }
}
